home *** CD-ROM | disk | FTP | other *** search
/ Mega Game 2000 #3 / Mega Game № 03 2000.iso / Data / Mainmenu.dxr / Script_99_scr_news_old.ls < prev    next >
Encoding:
Text File  |  2000-02-15  |  2.1 KB  |  83 lines

  1. global numNews, curNews, wx1, wx2, strY, SSpr, uSpeed, bSetNews, arrStr, curX
  2.  
  3. on NewsInit
  4.   bSetNews = 0
  5.   numNews = 9
  6.   if curNews < numNews then
  7.     curNews = curNews + 1
  8.   else
  9.     curNews = 1
  10.   end if
  11.   wx1 = 50
  12.   wx2 = 700
  13.   strY = 482
  14.   SSpr = 30
  15.   uSpeed = 2
  16.   arrStr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  17.   curX = 0
  18. end
  19.  
  20. on NewsRedraw
  21.   if (curNews = 0) or (bSetNews = 0) then
  22.     bSetNews = 1
  23.     curNews = 1
  24.     set the member of sprite SSpr to "N" & curNews
  25.     set the locH of sprite SSpr to wx2
  26.     set the locV of sprite SSpr to strY
  27.   else
  28.     if uSpeed > 0 then
  29.       if (the locH of sprite SSpr + the width of sprite SSpr) > wx1 then
  30.         set the locH of sprite SSpr to the locH of sprite SSpr - uSpeed
  31.       else
  32.         if curNews < numNews then
  33.           curNews = curNews + 1
  34.           set the member of sprite SSpr to "N" & curNews
  35.         else
  36.           curNews = 1
  37.           set the member of sprite SSpr to "N" & curNews
  38.         end if
  39.         set the locH of sprite SSpr to wx2
  40.       end if
  41.     else
  42.       if the locH of sprite SSpr < wx2 then
  43.         set the locH of sprite SSpr to the locH of sprite SSpr - uSpeed
  44.       else
  45.         if curNews > 1 then
  46.           curNews = curNews - 1
  47.           set the member of sprite SSpr to "N" & curNews
  48.         else
  49.           curNews = numNews
  50.           set the member of sprite SSpr to "N" & curNews
  51.         end if
  52.         set the locH of sprite SSpr to wx1 - the width of sprite SSpr
  53.       end if
  54.     end if
  55.   end if
  56. end
  57.  
  58. on NewsSpeed uSpeedA
  59.   uSpeed = uSpeedA
  60. end
  61.  
  62. on NewsNext
  63.   if curNews < numNews then
  64.     curNews = curNews + 1
  65.     set the member of sprite SSpr to "N" & curNews
  66.   else
  67.     curNews = 1
  68.     set the member of sprite SSpr to "N" & curNews
  69.   end if
  70.   set the locH of sprite SSpr to wx2
  71. end
  72.  
  73. on NewsPrev
  74.   if curNews > 1 then
  75.     curNews = curNews - 1
  76.     set the member of sprite SSpr to "N" & curNews
  77.   else
  78.     curNews = numNews
  79.     set the member of sprite SSpr to "N" & curNews
  80.   end if
  81.   set the locH of sprite SSpr to wx2
  82. end
  83.